/*************************************************************************
	> File Name: mysql_api.h
	> Author: 
	> Mail: 
	> Created Time: Tue 30 Mar 2021 05:35:56 PM CST
 ************************************************************************/

#ifndef _MYSQL_API_H
#define _MYSQL_API_H
struct slaveInfo {
	unsigned int id;
	char *name;
	char *ip;
	char *updateTime;
};

struct slaveInfo_select {
	int id;
	int name;
	int ip;
	int updateTime;
};

void getNowTime(char *time_str, int size);
MYSQL *connectDB(char *ipAddr, char *user, char * passwd, char *database, unsigned int port);

int insert_slaveInfo(struct slaveInfo si);
int update_slaveInfo(struct slaveInfo si, struct slaveInfo_select sis);
#endif
